package com.cch.cooperation.api.bookkeepping.controller;

import com.cch.cooperation.api.bookkeepping.service.BookkeepingCategoryServiceImpl;
import com.cch.cooperation.common.web.response.Response;
import com.cch.cooperation.dao.bookkeeping.model.BookkeepingCategory;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


/**
 * 收支明细分类接口
 *
 * @author cch
 */
@Api(tags = "收支明细分类接口")
@RestController
@RequestMapping("/api/bookkeeping/category")
public class BookkeepingCategoryController {

    @Resource
    private BookkeepingCategoryServiceImpl bookkeepingCategoryService;

    @ApiOperation("查询列表")
    @GetMapping("/queryList")
    public Response<List<BookkeepingCategory>> queryList(Integer type) {
        List<BookkeepingCategory> data = bookkeepingCategoryService.queryList(type);
        return Response.success(data);
    }

}
